Is it possible to use attribute dxl to compare the text of an attribute in the current module with the text of a different attribute in another module and return the Object ID's of the Objects with matching text?
|
Re: Text compare attribute
So for an oA in mA you want to see the IDs of all oBs in mB that have the same text as oA.
//[1] Read current module B
Skip skpTextB = create // key is raw Text in B; data is list of B ObjIs with that text
Open mB
for every oB
{ TextB = oB."Object Text"
if (null TextB) then continue
ObjListB = ""
if (find(skpTextB, TextB, ObjListB)) then delete(skpTextB, TextB)
if (length(ObjListB) > 0) then
then ObjListB = ObjListB "," identifier(oB)
else ObjListB = identifier(oB)
// use Buffer instead...
put(skpTextB, TextB, ObjListB)
}
//[2] Set mA values
for every oA
{ TextA = oA."Object Text"
if (null TextA) then continue
ObjListB = "." // This is a key feature. It sets oA to something other than null so the Attr DXL does not keep recalculating.
find(skpTextB, TextA, ObjListB)
oA.attrDXLName = ObjListB
}
delete(skpTextB)
|